#导包
from rest_framework import serializers
from .models import * 
from courseapp.models import * 

#用户类的序列器
class UserSer(serializers.ModelSerializer):

    class Meta:
        model = User
        fields = '__all__'

#课程的序列器
class CourseSer(serializers.ModelSerializer):

    class Meta:
        model = Course
        fields = '__all__'

#用户-课程序列器
class UsertoCourseSer(serializers.ModelSerializer):
    class Meta:
        model = UsertoCourse
        fields = "__all__"

#用户-课程序列器
class UsertoPathSer(serializers.ModelSerializer):
    class Meta:
        model = UsertoPath
        fields = "__all__"
#课程类别的序列器
class CoursTypeSer(serializers.ModelSerializer):

    class Meta:
        model = CourseType
        fields = '__all__'
        
#课程标签的序列器
class CourseTagsSer(serializers.ModelSerializer):

    class Meta:
        model = CourseTags
        fields = '__all__'

class CouponsSer(serializers.ModelSerializer):

    class Meta:
        model = Coupons
        fields = "__all__"